﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>随机模型</title>
    <link href="../css/main.css" rel="stylesheet" type="text/css" />
    <link href="../css/Jqbox.css" rel="stylesheet" type="text/css" />
    <link href="../css/jquery.loadmask.css" rel="stylesheet" type="text/css" />
    <script src="../js/jquery-1.5.2.min.js" type="text/javascript"></script>
    <script src="../js/ligerui.min.js" type="text/javascript"></script>
    <script src="../Js/jquery.dialog.js" type="text/javascript"></script>
    <script src="../Js/conmon.js" type="text/javascript"></script>
    <script src="../Js/jquery.loadmask.min.js" type="text/javascript"></script>
     <script type="text/javascript">
         var modelID;
         $(function () {
             pWind = parent.window.parent.window.getWindow();
             if (pWind == null) {
                 showErrorTip("参数错误！");
                 closeRefresh(false, "");
             }
             modelID = pWind.$("#modelID").val();

             //显示gride
             $grid = $("#divGrid").ligerGrid({
                 columns: [
               { display: '序号', align: 'center', width: 40, type: 'int', isSort: false,
                   render: function (item, i) {
                       i = i + 1;
                       return i;
                   }
               },
                { display: '题型', name: 'type', align: 'center', width: 150,
                    render: function (item) {
                        if (item.type == 1)
                            return "单选题";
                        else if (item.type == 2)
                            return "多选题";
                        else if (item.type == 3)
                            return "判断题";
                        else if (item.type == 4)
                            return "填空题";
                        else if (item.type == 5)
                            return "问答题";
                        else if (item.type == 6)
                            return "打字题";
                    }
                },
                { display: '数量', align: 'center', width: 150,
                    render: function (item) {
                        return (parseInt(item.rolecount) + parseInt(item.publiccount));
                    }
                },
                { display: '每题分数', name: 'score', align: 'center', width: 100 },
                { display: '大题分数', align: 'center', width: 100,
                    render: function (item) {
                        return ((parseInt(item.rolecount) + parseInt(item.publiccount)) * item.score);
                    }
                }
                ],
                 parms: [{ name: 'modelID', value: modelID}],
                 dataAction: 'server', pageSize: 50,
                 url: '../WebServer/ModelManage.ashx?Action=RandomModelDetList&rnd=' + Math.random().toString(),
                 sortName: 'id',
                 width: '97%', height: '95%',
                 onDblClickRow: function (data, rowindex, rowobj) {

                 }
             });
         });
     </script>
</head>
<body>
    <div id="divGrid">

    </div>
</body>
</html>
